package com.generic.mybatis.dal.dao.criteria;

import com.generic.mybatis.dal.interceptor.automap.TableMapper;

import org.apache.ibatis.jdbc.SQL;

import java.util.Map;

/**
 * is null
 *
 * @author wuaj
 */
public class NullCriteria extends FieldCriteria {
    public NullCriteria(String field) {
        super(field, null);
    }

    @Override
    public void toSql(TableMapper mapper, SQL sql, Map paramMap) {
        sql.WHERE(String.format("%s is  null ", getAlias(mapper)));
    }
}
